home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2614.ZIP / DISPLA.ZIP / TEST_50.PRG < prev    next >
Text File  |  1990-12-02  |  1KB  |  41 lines

  1. @ 0,0 CLEAR
  2.  
  3. cInFile   := "display.doc "     // filename must have extension
  4. cKey      := ""                 // key pressed when dispfile() exits
  5. nNColor   := 7                  // foreground color
  6. nHColor   := 15                 // background color
  7. nColSkip  := 5                  // how many columns to move for left/right arrow
  8. nRMargin  := 132                // max line size
  9. cExitKeys := "AaBbC       "     // keys that can terminate routine
  10. lBrowse   := .f.
  11. nStart    := 1
  12. nBuffSize := 4096
  13.  
  14. @ 0,0  SAY "Enter filename: "   GET cInFile
  15. @ 1,0  SAY "    Foreground: "   GET nNColor   PICTURE "999"
  16. @ 2,0  SAY "     Highlight: "   GET nHColor   PICTURE "999"
  17. @ 3,0  SAY "     Exit keys: "   GET cExitKeys
  18. @ 4,0  SAY "   Buffer Size: "   GET nBuffSize PICTURE "9999"
  19. @ 1,40 SAY "column increment: " GET nColSkip  PICTURE "999"
  20. @ 2,40 SAY "   max line size: " GET nRMargin  PICTURE "999"
  21. @ 3,40 SAY "     browse mode? " GET lBrowse   PICTURE "Y"
  22.  
  23. READ
  24.  
  25. *
  26. * remember a window will be one size less and greater than the passed coord.'s
  27. *
  28. * the 9th parameter contains the keys that the routine will terminate on
  29. * and the CHR(143) represents the F3 key.
  30. *
  31.  
  32. @ 4,9 TO 11,71
  33.  
  34. cKey = DispFile(cInFile, 5, 10, 10, 70, nStart,;
  35.                 nNColor, nHColor, cExitKeys + CHR(143),;
  36.                 lBrowse, nColSkip, nRMargin, nBuffSize)
  37.  
  38. @ 20,0 SAY "Key pressed was: " + '[' + cKey + ']'
  39.  
  40. QUIT
  41.